<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Page Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" media="screen" href="./css/goods.css" />
    <link rel="stylesheet" type="text/css" href="./css/iconfont.css">
</head>

<body>
    <!-- 头部 -->
    <div class="bc-header">
        <a href=""><img src="./images/leftzzz.png" alt="" class="left"></a>
        <div>省钱控-最新优惠</div>
        <a href=""><img src="./images/header_app.png" alt="" class="download"></a>
    </div>
    <!-- 商品列表 -->
    <div class="goods-list">
        <!-- <a href="#">
            <div class="goods-pic"><img src="./images/goods2.jpg" alt=""></div>
            <div class="goods-des">
                <div class="goods-title">
                    库存浅：SENSHUKAI 千趣会 383896 婴幼儿运动裤 <span>8.8元</span>
                </div>
                <div class="goods-other">
                    天猫旗舰店 | 11-02 17:29
                    <span>4</span>
                    <span class="iconfont icon-xiaoxi"></span>
                </div>
            </div>
        </a> -->
    </div>
    <!-- 分页 -->
    <div class="page">
        <div>上一页</div>
        <select name="" id="">
            <option value="">1</option>
            <option value="">2</option>
            <option value="">3</option>
        </select>
        <div>下一页</div>
    </div>
    <!-- 脚部 -->
    <div class="footer">
        <ul class="clearfix">
            <li><a href="#">登录</a></li>
            <li><a href="#">注册</a></li>
            <li style="width: 40%"><a href="#"><img src="./images/top.jpg">返回顶部</a></li>
        </ul>
        <div class="footer-des">
            <span>手机APP下载</span>
            <span>慢慢买手机版 -- 掌上比价平台</span>
            <p>m.manmanbuy.com</p>
        </div>
        <div class="to-top"><a href="#"><img src="./images/up.png" alt=""></a></div>
    </div>
</body>

</html>
<script src="./lib/jquery/jquery.js"></script>
<script src="./lib/artTemplate/template.js"></script>
<script type="text/template" id="goodslistTmp">
{{each result as val}}
            <a href="#">
            <div class="goods-pic">
                <img src="http://a.manmanbuy.com:8013/cuxiaoPic/201610/201610001412282758.jpg" alt="">
            </div>
            <div class="goods-des">
                <div class="goods-title">
                    {{val.productName}} <span>{{val.productPinkage}}</span>
                </div>
                <div class="goods-other">
                    {{val.productFrom}} | {{val.productTime}}
                    <span>4</span>
                    <span class="iconfont icon-xiaoxi"></span>
                </div>
            </div>
        </a>
{{/each}}
</script>
<script>
    $.ajax({
        type: 'get',
        url: 'http://193.112.55.79:9090/api/getmoneyctrl',
        success: function (res) {
            // console.log(typeof res);
            console.log(res.result);
            console.log(res.result[0].productImgSm)
            var htmlStr = template('goodslistTmp', res);
            $('.goods-list').html(htmlStr);
        }
    })
</script>